<template>
  <vxe-modal ref="vxeModal" v-bind="options" v-on="events">
    <template v-if="$slots.title" #title><slot name="title" /></template>
    <template v-if="$slots.header" #header><slot name="header" /></template>
    <template #default>
      <slot />
    </template>
    <template v-if="$slots.footer" #footer><slot name="footer" /></template>
  </vxe-modal>
</template>

<script setup>
import { useModalConfig } from '@/components/vxe-table/vxe-config.js'
const props = defineProps({
  config: {
    type: Object,
    default: () => ({
      options: {},
      events: {},
    }),
  },
})
const { options, events } = useModalConfig(props?.config)
</script>

<style scoped></style>
